package com.restaurant.springboot.utils;

public enum RespCode {

    SUCCESS(200, "success"),
    NO_REGISTER(500, "还未注册"),
    NO_LOGIN(500, "未登录"),
    SOURCE_NOT_FOUND(404, "资源不存在"),
    OUT_OF_SALE(500, "存货不足"),
    ILLEGALTOKEN(508, "illegal token"),
    OTHERLOGGEDIN(512, "other clients logged in"),
    TOKENEXPIRED(514, "token expired"),
    PASSWORDERROR(60204, "Account and password are incorrect."),
    ERROR(500, "后台错误");

    private int code;
    private String message;

    RespCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
